Any way to surround code block with Curly Braces {} in VS2008?

Posted by Jim McKeeth on Stack Overflow See other posts from Stack Overflow or by Jim McKeeth
Published on 2010-05-04T22:55:30Z Indexed on 2010/05/04 23:18 UTC
Read the original article Hit count: 225

I always find myself needing to enclose a block of code in curly braces { }, but unfortunately that isn't included in the C# surround code snippets, which seems to be an oversight. I couldn't find anything on building your own surround snippets either (just other kinds of snippets).

I am actually running Resharper too, but it doesn't seem to have this functionality either (or I haven't figured how to activate it).

We have a coding standard of including even a single line of code after an if or else in curly braces, so if I could just make Resharper do that refactor automatically that would be even better!

© Stack Overflow or respective owner

Related posts about visual-studio-2008

Related posts about c#